from fastapi import APIRouter, Request
from applications.configs.func import render_template
from applications.services.videos import get_video_list

videos_router = APIRouter(prefix="/video", tags=["视频管理器"])


@videos_router.get("/", summary='视频首页', description="视频首页")
def index(request: Request):
    return render_template(request, "/videos/index.html", {"video_list": get_video_list()})